1. Field of the Invention
The present invention relates to a method and computer program for converting an assembly language program for one processor so as to be implementable on another processor.
2. Description of Related Art
A processor (or microprocessor) is a computer which executes a program in order to produce a desired behavior. The program consists of a set of statements for implementing operations such as addition, subtraction, data-read from a memory connected to the processor, data-write to such a memory, etc. An instruction set varies from processor to processor, and hence, if an assembly language program described for one processor is to be implemented on another processor, it is necessary to convert the instruction descriptions for one processor to those implementable on another processor.
As is known in the art, the instruction (code) conversions are generally grouped into two: one is a conversion at a binary level and the other at a source level. The instruction conversion at the binary level is disclosed in the following documents (1) to (5), while the instruction conversion at the source code level is disclosed in the following documents (6) and (7).
The document (1) is a paper entitled “Dynamic Binary Translation and Optimization” by Kermal Ebcioglu, et al., IEEE Transactions on Computers, Vol. 50, No. 6, pp. 529-548, June 2001. The document (2) is a paper entitled “Open Source DAISY” available at IBM internet home page (http://oss.software.ibm.com/developerworks/opensource/daisy/). Each of the documents (1) and (2) is concerned with a translator named DAISY which is software for dynamically translating binary codes for the Intel x86 or IBM PowerPC to the IBM VLIW (Very Long Instruction Word) processor.
The document (3) is a paper entitled “FX132 A profile-Directed Binary Translator” by Anton Chernoff, et al., IEEE Micro, Vol. 18, No. 2, pp.56-64, March/April 1998. The document (3) describes the software named FX132 for converting the binary codes for the x86 architecture so as to be executed on the Alpha processor.
The document (4) is a technical report entitled “The Technology Behind Crusoe Processors” by Alexander Klaiber, et al., Transmeta Corporation, pp.1-18, January 2000. Although the processor Crusoe has an instruction set which is a different architecture of the Intel x86, the Crusoe is able to translate the instructions of the x86 to those of the Crusoe at a binary level.
The document (5) is a product data sheet entitled “Dynamite Dynamic Binary Translation” by Transitive Technologies Ltd., 2001, available at http://www.transives.com. According to this document, the binary codes for one processor are translated to the binary codes for another processor.
The document (6) is a paper entitled “Automatic Assembler Source Translation from the Z80 to the MC6809” by M. F. Smith, et al., IEEE Micro, Vol., No. 2, pp.3-9, April, 1984. This document describes a technology for converting Z80 code to MC6809 code using a Pascal program.
The document (7) is a paper entitled “TMS320C5x to TMS320C54x Translation Utility”, Literature Number: BPRA075, published by Texas Instrument Europe, February 1998. This document describes the translation technology for converting the assembly source codes for the C5x of the Texas Instruments to the assembly codes which are executable on the C54x processor.
As is known in the art, there are two types of addressing schemes: one is byte addressing where a unique address is assigned to each byte of memory, and the other is word addressing where a unique address is assigned to more than one byte of memory.
Each of the above-mentioned documents (1) to (7) discloses technologies for converting the assembly language program having the same addressing scheme of byte addressing.
Up until now, however, no proposal has been made which converts the assembly language instructions (viz., assembly language program) with different addressing schemes (viz., byte addressing and word addressing). The reason for this may reside in the fact that it is difficult to effectively convert the address descriptions in the original program without sacrifice of the execution time on the target program, and that the code size of the converted program becomes undesirably lengthy.